home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 37 / CD Expert nº 37.iso / LastCall / lastcall.exe / stuff / lastcall.dxr / 00063.ls < prev    next >
Encoding:
Text File  |  2000-03-27  |  2.6 KB  |  83 lines

  1. on checkDB start, finish
  2.   global gDemoVersion, gDemoCharacters
  3.   if voidp(start) then
  4.     start = 1
  5.   end if
  6.   if voidp(finish) then
  7.     if gDemoVersion then
  8.       finish = 7
  9.     else
  10.       finish = 19
  11.     end if
  12.   end if
  13.   repeat with X = start to finish
  14.     thisChar = getCharCode(X)
  15.     put "Testing" && thisChar && sprite(X).member.fileName
  16.     flashSprite = sprite(X)
  17.     memberNum = flashSprite.member
  18.     frameCount = memberNum.frameCount
  19.     labelList = []
  20.     repeat with fff = 1 to frameCount
  21.       thisLabel = getFrameLabel(flashSprite, fff)
  22.       if thisLabel <> EMPTY then
  23.         add(labelList, [#label: thisLabel, #start: fff, #end: fff, #mid: []])
  24.         previous = labelList[labelList.count]
  25.         repeat with Y = fff + 1 to frameCount
  26.           thisLabel = getFrameLabel(flashSprite, Y)
  27.           if thisLabel <> EMPTY then
  28.             if thisLabel starts "End" then
  29.               previous[#end] = Y
  30.               exit repeat
  31.               next repeat
  32.             end if
  33.             add(previous[#mid], [#label: thisLabel, #start: Y])
  34.           end if
  35.         end repeat
  36.         fff = Y
  37.       end if
  38.     end repeat
  39.     put "Labels for" && thisChar
  40.     thisOne = getIt(X)
  41.     repeat with verify in [#ABLOTTO, #ABUZZ, #approach, #ASOBER, #base1, #beckon, #bounce, #CARDEXCUSE, #CARDGEN, #CARDNEG, #dance, #drink, #DRINKD, #DRINKS, #DRINKDD, #flatter, #GREETA, #GREETB, #nCharm, #NDRINKD, #NDRINKS, #NDRINKZ, #passOut, #PCharm, #PDRINKD, #PDRINKS, #retreat, #TICKET, #WDRINKD, #WDRINKS, #WDRINKZ, #WORDERD, #WORDERS, #WORDERZ, #XNCHARM, #XPCHARM]
  42.       found = 0
  43.       repeat with act = 1 to count(thisOne)
  44.         if getPropAt(thisOne, act) = verify then
  45.           found = 1
  46.           exit repeat
  47.         end if
  48.       end repeat
  49.       if not found then
  50.         put "No entry in the database for action" && verify && "for this character" && thisChar
  51.         next repeat
  52.       end if
  53.     end repeat
  54.     repeat with Y = 1 to count(thisOne)
  55.       test = thisOne[Y]
  56.       repeat with z = 1 to count(test)
  57.         q = test[z]
  58.         if listp(q) then
  59.           repeat with w = 1 to count(q)
  60.             newProp = getPropAt(q, w)
  61.             if newProp = #anim then
  62.               if not findLabel(sprite(X), q[w]) then
  63.                 put "Missing flash label for database entry" && q[w] && "for character" && thisChar
  64.               end if
  65.             end if
  66.           end repeat
  67.         end if
  68.       end repeat
  69.     end repeat
  70.   end repeat
  71. end
  72.  
  73. on getIt X
  74.   global gCharacterActions
  75.   sort(gCharacterActions)
  76.   return gCharacterActions[X]
  77. end
  78.  
  79. on getCharCode X
  80.   global gCharacterActions
  81.   return getPropAt(gCharacterActions, X)
  82. end
  83.